package com.nervenets.web.controller.knowledge;

import com.nervenets.web.controller.TokenParams;
import com.nervenets.web.hibernate.domain.knowledge.Attachment;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
public class KnowledgeEditParams extends TokenParams {
    @ApiModelProperty(value = "知识库ID，不传为新建")
    private long knowledgeId;
    @ApiModelProperty(value = "所属团队ID", required = true)
    @Positive(message = "团队ID不能为空")
    private long managerId;
    @ApiModelProperty(value = "团队成员ID")
    private long userId;
    @ApiModelProperty(value = "标签IDs", required = true)
    @NotEmpty(message = "必须选择一个或多个标签")
    private List<Long> tagsIds;
    @ApiModelProperty(value = "知识库标题", required = true)
    @NotNull(message = "标题不能为空")
    private String title;
    @ApiModelProperty(value = "知识库内容")
    private String content;
    @ApiModelProperty(value = "附件列表")
    private List<Attachment> attachments;
}
